import { createRouter, createWebHistory } from 'vue-router'
import connection from '@/view/connection'
import about1 from '@/view/about1'
import project from '@/view/project'
import news from '@/view/news'
const routes = [
    {
        path:'/',
        redirect:'/index'
    },
    {
        path:'/index',
        name:'log',
        component:()=>import ("../view/index.vue")
    },
    {
        path: '/about',
        name: 'about',
        component: about1,
        meta: {
          requireAuth: true
        }
      },
      {
        path: '/project',
        name: 'project',
        component: project
      },
      {
        path: '/project/case/:id',
        component: () => import('@/view/case')
      },
      {
        path: '/news',
        name: 'news',
        component: news
      },
      {
        path: '/news/newsparticulars/:id',
        name: 'newsparticulars',
        component: () => import('@/view/newsparticulars/index')
      },
      {
        path: '/certification',
        name: 'certification',
        component: ()=> import("@/view/certification")
      },
      {
        path: '/certification/commitment',
        name: 'commitment',
        component: () => import('@/view/certification/commitment')
    
      },
      {
        path: '/certification/enterprise',
        name: 'enterprise',
        component: () => import('@/view/certification/enterprise')
      },
      {
        path: '/certification/environmental',
        name: 'environmental',
        component: () => import('@/view/certification/environmental')
      },
      {
        path: '/certification/health',
        name: 'health',
        component: () => import('@/view/certification/health')
      },
      {
        path: '/certification/production',
        name: 'production',
        component: () => import('@/view/certification/production')
      },
      {
        path: '/certification/class',
        name: 'class',
        component: () => import('@/view/certification/class')
      },
      {
        path: '/human',
        name: 'human',
        component: () => import('@/view/human')
      },
      {
        path: '/contact',
        name: 'contact',
        component: connection
      }
   
]



const router = createRouter({
    history: createWebHistory(),
    routes
})
export default router
